import {mutaitionTypes} from "./config.js"
const mixin = {
    computed:{
        count:function(){
            return this.$store.state.count
        },
        carList:function(){
            return this.$store.state.carList
        },
        numList:function(){
            return this.$store.state.numList
        }
    },
    methods: {
        plus(){
            this.$store.commit(mutaitionTypes.COUNTPLUS)
        },
        minus(){
            this.$store.commit(mutaitionTypes.COUNTMINUS)
        },
        addaddcount(){
            this.$store.commit(mutaitionTypes.ADDADDCOUNT)
        },
        addcar(i){
            this.$store.state.carList.forEach((item)=>{
                if(item.basicInfo.id==i.basicInfo.id){
                    
                }else{

                }
            })
            this.$store.commit(mutaitionTypes.ADDCAR,i)
        },
        
    },
}
export default mixin;